package com.db.controller;

import com.db.common.util.ShiroUtiles;
import com.db.pojo.SysUser;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
public class PageController {

	@RequestMapping("doLoginUI")
	public String doLoginUI() {
		return "login";
	}

	@RequestMapping("doIndexUI")
	public String doIndexUI(Model model) {
		SysUser user = ShiroUtiles.getUser();
		model.addAttribute("user", user); //页面显示用户名
		return "starter";
	}

	@RequestMapping("doPageUI")
	public String doPageUI() {
		return "common/page";
	}

	//rest风格的url
	@RequestMapping("{module}/{moduleUI}")
	public String deModuleUI(@PathVariable String moduleUI) {
		return "sys/" + moduleUI;
	}
}
